package darkaif.model.sandy{
	import sandy.primitive.Primitive3D;
	import sandy.core.scenegraph.Geometry3D;
	import sandy.core.scenegraph.Shape3D;

	public class platform_map_default extends Shape3D implements Primitive3D {
		private var l:Geometry3D;

		private function f(v1:Number,v2:Number,v3:Number,uv00:Number,uv01:Number,uv10:Number,uv11:Number,uv20:Number,uv21:Number,normX:Number,normY:Number,normZ:Number):void {
			var uv1:Number = l.getNextUVCoordID();
			var uv2:Number = uv1 + 1;
			var uv3:Number = uv2 + 1;

			l.setUVCoords(uv1,uv00,1-uv01);
			l.setUVCoords(uv2,uv10,1-uv11);
			l.setUVCoords(uv3,uv20,1-uv21);

			l.setFaceVertexIds(l.getNextFaceID(), v1,v2,v3);
			l.setFaceUVCoordsIds(l.getNextFaceUVCoordID(), uv1,uv2,uv3);
			l.setFaceNormal(l.getNextFaceNormalID(), normX,normZ,normY);
		}

		private function f2(v1:Number,v2:Number,v3:Number):void {
			l.setFaceVertexIds(l.getNextFaceID(), v1,v2,v3);
		}

		private function v(vx:Number,vy:Number,vz:Number):void {
			l.setVertex(l.getNextVertexID(),vx,vz,vy);
		}

		public function platform_map_default( p_Name:String=null ) {
			super( p_Name );
			geometry = generate();
		}

		public function generate(... arguments):Geometry3D {
			l = new Geometry3D();
			v(128.000000,128.000000,-0.000002);
			v(128.000000,128.000000,-2.000001);
			v(-128.000061,128.000000,-2.000001);
			v(-127.999977,128.000000,0.000000);
			v(128.000046,-128.000000,0.000001);
			v(127.999924,-128.000000,-2.000000);
			v(-128.000092,-128.000000,-1.999998);
			v(-128.000031,-128.000000,0.000001);
			v(-128.000031,-136.000000,0.000001);
			v(-128.000092,-136.000000,-1.999998);
			v(127.999924,-136.000000,-2.000000);
			v(128.000046,-136.000000,0.000001);
			v(-127.999977,136.000000,0.000000);
			v(-128.000061,136.000000,-2.000001);
			v(128.000000,136.000000,-2.000001);
			v(128.000000,136.000000,-0.000002);
			v(-136.000061,136.000000,-1.999985);
			v(-136.000000,136.000000,0.000016);
			v(-136.000092,-136.000000,-1.999982);
			v(-136.000031,-136.000000,0.000017);
			v(-136.000031,-128.000000,0.000017);
			v(-136.000092,-128.000000,-1.999982);
			v(-136.000000,128.000000,0.000016);
			v(-136.000061,128.000000,-1.999985);
			v(135.999985,136.000000,-0.000019);
			v(135.999985,136.000000,-2.000018);
			v(136.000046,-136.000000,-0.000016);
			v(135.999908,-136.000000,-2.000017);
			v(135.999908,-128.000000,-2.000017);
			v(136.000046,-128.000000,-0.000016);
			v(135.999985,128.000000,-2.000018);
			v(135.999985,128.000000,-0.000019);
			v(136.000092,-128.000000,1.999984);
			v(136.000031,128.000000,1.999981);
			v(136.000092,-136.000000,1.999984);
			v(128.000092,-136.000000,2.000001);
			v(136.000031,136.000000,1.999981);
			v(128.000031,136.000000,1.999998);
			v(-135.999985,-128.000000,2.000017);
			v(-135.999954,128.000000,2.000016);
			v(-135.999985,-136.000000,2.000017);
			v(-127.999962,-136.000000,2.000001);
			v(-135.999954,136.000000,2.000016);
			v(-127.999924,136.000000,2.000000);
			v(-127.999924,128.000000,2.000000);
			v(-127.999962,-128.000000,2.000001);
			v(128.000031,128.000000,1.999998);
			v(128.000092,-128.000000,2.000001);

			f(47,45,41,0.016634,0.014706,0.015152,0.483855,0.000046,0.483810,0.000000,0.000000,1.000000);
			f(47,41,35,0.016634,0.014706,0.000046,0.483810,0.001529,0.014661,0.000000,0.000000,1.000000);
			f(44,46,37,0.498517,0.485294,0.500000,0.016145,0.515105,0.016190,0.000000,0.000000,1.000000);
			f(44,37,43,0.498517,0.485294,0.515105,0.016190,0.513622,0.485339,0.000000,0.000000,1.000000);
			f(44,43,42,0.498517,0.485294,0.513622,0.485339,0.513576,0.500000,0.000002,0.000000,1.000000);
			f(44,42,39,0.498517,0.485294,0.513576,0.500000,0.498471,0.499955,0.000002,0.000000,1.000000);
			f(41,45,38,0.000046,0.483810,0.015152,0.483855,0.015105,0.498516,0.000002,0.000000,1.000000);
			f(41,38,40,0.000046,0.483810,0.015105,0.498516,0.000000,0.498471,0.000002,0.000000,1.000000);
			f(45,44,39,0.015152,0.483855,0.498517,0.485294,0.498471,0.499955,0.000002,0.000000,1.000000);
			f(45,39,38,0.015152,0.483855,0.498471,0.499955,0.015105,0.498516,0.000002,0.000000,1.000000);
			f(37,46,33,0.515105,0.016190,0.500000,0.016145,0.500046,0.001484,0.000002,0.000000,1.000000);
			f(37,33,36,0.515105,0.016190,0.500046,0.001484,0.515152,0.001529,0.000002,0.000000,1.000000);
			f(47,35,34,0.016634,0.014706,0.001529,0.014661,0.001576,0.000000,0.000002,0.000000,1.000000);
			f(47,34,32,0.016634,0.014706,0.001576,0.000000,0.016681,0.000045,0.000002,0.000000,1.000000);
			f(46,47,32,0.500000,0.016145,0.016634,0.014706,0.016681,0.000045,0.000002,0.000000,1.000000);
			f(46,32,33,0.500000,0.016145,0.016681,0.000045,0.500046,0.001484,0.000002,0.000000,1.000000);
			f(3,0,44,0.551664,0.939737,0.553147,0.470588,0.555441,0.939748,0.000000,-1.000000,0.000000);
			f(0,46,44,0.553147,0.470588,0.556924,0.470599,0.555441,0.939748,0.000000,-1.000000,0.000000);
			f(4,7,45,0.556924,0.939737,0.558406,0.470588,0.562183,0.470600,0.000000,1.000000,0.000000);
			f(4,45,47,0.556924,0.939737,0.562183,0.470600,0.560700,0.939749,0.000000,1.000000,0.000000);
			f(0,4,47,0.568925,0.939748,0.567442,0.470599,0.571218,0.470588,-1.000000,-0.000000,0.000023);
			f(0,47,46,0.568925,0.939748,0.571218,0.470588,0.572701,0.939737,-1.000000,-0.000000,0.000015);
			f(7,3,44,0.563666,0.939748,0.562183,0.470600,0.565959,0.470588,1.000000,-0.000000,-0.000027);
			f(7,44,45,0.563666,0.939748,0.565959,0.470588,0.567442,0.939737,1.000000,-0.000000,-0.000034);
			f(8,11,41,0.537231,0.954409,0.538714,0.485260,0.541007,0.954420,0.000000,-1.000000,0.000000);
			f(11,35,41,0.538714,0.485260,0.542490,0.485271,0.541007,0.954420,0.000000,-1.000000,0.000000);
			f(15,12,43,0.547842,0.954409,0.546359,0.485260,0.550135,0.485249,0.000000,1.000000,0.000000);
			f(15,43,37,0.547842,0.954409,0.550135,0.485249,0.551618,0.954398,0.000000,1.000000,0.000000);
			f(12,17,42,0.546359,0.485260,0.546312,0.470599,0.550089,0.470588,0.000000,1.000000,0.000000);
			f(12,42,43,0.546359,0.485260,0.550089,0.470588,0.550135,0.485249,0.000000,1.000000,0.000000);
			f(17,22,39,0.520503,0.969070,0.520457,0.954409,0.524233,0.954398,-1.000000,0.000000,0.000023);
			f(17,39,42,0.520503,0.969070,0.524233,0.954398,0.524280,0.969059,-1.000000,0.000000,0.000023);
			f(19,8,40,0.537184,0.969070,0.537231,0.954409,0.540961,0.969081,0.000000,-1.000000,0.000000);
			f(8,41,40,0.537231,0.954409,0.541007,0.954420,0.540961,0.969081,0.000000,-1.000000,0.000000);
			f(20,19,40,0.518974,0.485260,0.518928,0.470599,0.522704,0.470588,-1.000000,0.000000,0.000023);
			f(20,40,38,0.518974,0.485260,0.522704,0.470588,0.522750,0.485249,-1.000000,0.000000,0.000023);
			f(22,20,38,0.520457,0.954409,0.518974,0.485260,0.522750,0.485249,-1.000000,0.000000,0.000023);
			f(22,38,39,0.520457,0.954409,0.522750,0.485249,0.524233,0.954398,-1.000000,0.000000,0.000023);
			f(24,15,37,0.547888,0.969070,0.547842,0.954409,0.551618,0.954398,0.000000,1.000000,0.000000);
			f(24,37,36,0.547888,0.969070,0.551618,0.954398,0.551664,0.969059,0.000000,1.000000,0.000000);
			f(31,24,36,0.528102,0.485260,0.528056,0.470599,0.531832,0.470588,1.000000,0.000000,-0.000023);
			f(31,36,33,0.528102,0.485260,0.531832,0.470588,0.531879,0.485249,1.000000,0.000000,-0.000023);
			f(11,26,35,0.538714,0.485260,0.538760,0.470599,0.542490,0.485271,0.000000,-1.000000,0.000000);
			f(26,34,35,0.538760,0.470599,0.542536,0.470610,0.542490,0.485271,0.000000,-1.000000,0.000000);
			f(26,29,32,0.529632,0.969070,0.529585,0.954409,0.533362,0.954398,1.000000,0.000000,-0.000023);
			f(26,32,34,0.529632,0.969070,0.533362,0.954398,0.533408,0.969059,1.000000,0.000000,-0.000023);
			f(29,31,33,0.529585,0.954409,0.528102,0.485260,0.531879,0.485249,1.000000,0.000000,-0.000023);
			f(29,33,32,0.529585,0.954409,0.531879,0.485249,0.533362,0.954398,1.000000,0.000000,-0.000023);
			f(31,30,25,0.528102,0.485260,0.524326,0.485272,0.524280,0.470611,1.000000,0.000000,0.000000);
			f(31,25,24,0.528102,0.485260,0.524280,0.470611,0.528056,0.470599,1.000000,0.000000,0.000000);
			f(28,29,26,0.525809,0.954420,0.529585,0.954409,0.529632,0.969070,1.000000,0.000000,-0.000069);
			f(28,26,27,0.525809,0.954420,0.529632,0.969070,0.525855,0.969081,1.000000,0.000000,-0.000069);
			f(31,29,28,0.528102,0.485260,0.529585,0.954409,0.525809,0.954420,1.000000,0.000000,-0.000069);
			f(31,28,30,0.528102,0.485260,0.525809,0.954420,0.524326,0.485272,1.000000,-0.000000,0.000000);
			f(5,1,30,0.015152,0.516145,0.016634,0.985294,0.001529,0.985339,-0.000002,-0.000000,-1.000000);
			f(5,30,28,0.015152,0.516145,0.001529,0.985339,0.000046,0.516190,-0.000002,-0.000000,-1.000000);
			f(10,5,28,0.015105,0.501484,0.015152,0.516145,0.000046,0.516190,-0.000002,0.000000,-1.000000);
			f(10,28,27,0.015105,0.501484,0.000046,0.516190,0.000000,0.501529,-0.000002,0.000000,-1.000000);
			f(11,10,27,0.538714,0.485260,0.534937,0.485249,0.534984,0.470588,0.000000,-1.000000,0.000000);
			f(11,27,26,0.538714,0.485260,0.534984,0.470588,0.538760,0.470599,0.000000,-1.000000,0.000000);
			f(1,14,25,0.016634,0.985294,0.016681,0.999955,0.001575,1.000000,-0.000002,0.000000,-1.000000);
			f(1,25,30,0.016634,0.985294,0.001575,1.000000,0.001529,0.985339,-0.000002,0.000000,-1.000000);
			f(14,15,24,0.544065,0.954420,0.547842,0.954409,0.547888,0.969070,0.000000,1.000000,0.000000);
			f(14,24,25,0.544065,0.954420,0.547888,0.969070,0.544112,0.969081,0.000000,1.000000,0.000000);
			f(23,22,17,0.516681,0.954421,0.520457,0.954409,0.520503,0.969070,-1.000000,0.000000,0.000031);
			f(23,17,16,0.516681,0.954421,0.520503,0.969070,0.516727,0.969081,-1.000000,0.000000,0.000031);
			f(20,21,18,0.518974,0.485260,0.515198,0.485272,0.515152,0.470611,-1.000000,0.000000,0.000031);
			f(20,18,19,0.518974,0.485260,0.515152,0.470611,0.518928,0.470599,-1.000000,0.000000,0.000031);
			f(23,21,20,0.516681,0.954421,0.515198,0.485272,0.518974,0.485260,-1.000000,0.000000,0.000031);
			f(23,20,22,0.516681,0.954421,0.518974,0.485260,0.520457,0.954409,-1.000000,0.000000,0.000031);
			f(2,6,21,0.500000,0.983855,0.498517,0.514706,0.513622,0.514661,-0.000002,-0.000000,-1.000000);
			f(2,21,23,0.500000,0.983855,0.513622,0.514661,0.515105,0.983810,-0.000002,-0.000000,-1.000000);
			f(6,9,18,0.498517,0.514706,0.498471,0.500045,0.513576,0.500000,-0.000002,0.000000,-1.000000);
			f(6,18,21,0.498517,0.514706,0.513576,0.500000,0.513622,0.514661,-0.000002,0.000000,-1.000000);
			f(9,8,19,0.533454,0.954398,0.537231,0.954409,0.537184,0.969070,0.000000,-1.000000,0.000000);
			f(9,19,18,0.533454,0.954398,0.537184,0.969070,0.533408,0.969059,0.000000,-1.000000,0.000000);
			f(12,13,17,0.546359,0.485260,0.542582,0.485271,0.546312,0.470599,0.000000,1.000000,0.000000);
			f(13,16,17,0.542582,0.485271,0.542536,0.470611,0.546312,0.470599,0.000000,1.000000,0.000000);
			f(13,2,23,0.500046,0.998516,0.500000,0.983855,0.515105,0.983810,-0.000002,0.000000,-1.000000);
			f(13,23,16,0.500046,0.998516,0.515105,0.983810,0.515152,0.998471,-0.000002,0.000000,-1.000000);
			f(15,14,12,0.547842,0.954409,0.544065,0.954420,0.546359,0.485260,0.000000,1.000000,0.000000);
			f(14,13,12,0.544065,0.954420,0.542582,0.485271,0.546359,0.485260,0.000000,1.000000,0.000000);
			f(1,2,13,0.016634,0.985294,0.500000,0.983855,0.500046,0.998516,0.000000,0.000000,-1.000000);
			f(1,13,14,0.016634,0.985294,0.500046,0.998516,0.016681,0.999955,0.000000,0.000000,-1.000000);
			f(11,8,10,0.538714,0.485260,0.537231,0.954409,0.534937,0.485249,0.000000,-1.000000,0.000000);
			f(8,9,10,0.537231,0.954409,0.533454,0.954398,0.534937,0.485249,0.000000,-1.000000,0.000000);
			f(6,5,10,0.498517,0.514706,0.015152,0.516145,0.015105,0.501484,-0.000000,0.000000,-1.000000);
			f(6,10,9,0.498517,0.514706,0.015105,0.501484,0.498471,0.500045,-0.000000,0.000000,-1.000000);
			f(4,0,3,0.515152,0.001439,0.998517,0.000000,1.000000,0.469149,0.000000,0.000000,1.000000);
			f(4,3,7,0.515152,0.001439,1.000000,0.469149,0.516635,0.470588,0.000000,0.000000,1.000000);
			f(1,5,2,0.016634,0.985294,0.015152,0.516145,0.500000,0.983855,0.000000,-0.000000,-1.000000);
			f(5,6,2,0.015152,0.516145,0.498517,0.514706,0.500000,0.983855,-0.000000,-0.000000,-1.000000);

			this.x = 0.000000;
			this.y = 0.000000;
			this.z = 0.000000;

			this.rotateX = 0.000000;
			this.rotateY = 0.000000;
			this.rotateZ = 0.000000;

			this.scaleX = 1.000000;
			this.scaleY = 1.000000;
			this.scaleZ = 1.000000;
			return (l);
		}
	}
}